//
//  KABModel.h
//  kabu
//
//  Created by XiangDongMBP on 2017/1/25.
//  Copyright © 2017年 East. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <YYModel.h>
#import "KABLoginModel.h"
#import "KABCosplayModel.h"
#import "KABExhibitionModel.h"
#import "KABMallModel.h"
#import "KABDefaultVarModel.h"
#import "KABSkinModel.h"

@interface KABModel : NSObject<YYModel, NSCoding>

@property (nonatomic, strong) KABLoginModel *userInfo;                  //!< 用户登录信息(为nil，表明未登录)
@property (nonatomic, strong) KABReceiverInfoList *receiverList;        //!< 收货地址
@property (nonatomic, strong) KABMineNewMsg *mineNewMsg;                //!< 点赞、评论、回复的数量

@property (nonatomic, strong) KABCosplayModel *cosplayListWhole;        //!< Cosplay_全部
@property (nonatomic, strong) KABCosplayModel *cosplayListRecommend;    //!< Cosplay_推荐
@property (nonatomic, strong) KABCosplayModel *cosplayListFollow;       //!< Cosplay_关注
@property (nonatomic, strong) KABCosplayCelebrity *cosplayCelebrity;    //!< 名人榜

@property (nonatomic, strong) KABExhibitionModel *exhibitionList;       //!< 展会列表

@property (nonatomic, strong) KABMallHomepage *mallHomepage;            //!< 新版商城首页
@property (nonatomic, strong) KABMallBannerList *mallBannerList;        //!< 商城首页的Banner
@property (nonatomic, strong) KABMallProductList *mallProductList;      //!< 商城首页的商品列表
@property (nonatomic, strong) KABMallProductType *mallProductType;      //!< 商品分类的页面


+ (instancetype)sharedInstance;
- (BOOL)saveToDisk;
- (BOOL)getFromDisk;
@end


@interface KABModel (LoginRelative)
@property (nonatomic, readonly) BOOL isLogin;
- (KABLoginModel *)loginModelWithDictionary:(NSDictionary *)dic;
- (void)updateTokenByModifyPwd:(NSDictionary *)dic;
- (void)saveUserInfoWithPwd:(NSString *)pwd;
- (void)saveWxAccessToken;
- (void)rongCloudOnLine;            //!< 融云IM上线
- (void)refreshRongCloudOwnerInfo;  //!< 更新融云IM当前用户的信息
- (void)logout;
- (void)updateNickName:(NSString *)nickName sex:(NSInteger)sex province:(NSString *)province city:(NSString *)city sign:(NSString *)sign;
- (KABLoginModel *)updateLoginInfoWithMineInfo:(NSDictionary *)dic;
- (KABReceiverInfoList *)receiverListWithDictionary:(NSDictionary *)dic;
- (KABMineNewMsg *)mineNewMsgWithDictionary:(NSDictionary *)dic;
@end


@interface KABModel (CosplayRelative)
- (KABCosplayModel *)cosplayListWholeWithDictionary:(NSDictionary *)dic isAddMore:(BOOL)addMore;
- (KABCosplayModel *)cosplayListRecommendWithDictionary:(NSDictionary *)dic isAddMore:(BOOL)addMore;
- (KABCosplayModel *)cosplayListFollowWithDictionary:(NSDictionary *)dic isAddMore:(BOOL)addMore;
- (KABCosplayCelebrity *)cosplayCelebrityWithDictionary:(NSDictionary *)dic isAddMore:(BOOL)addMore;
@end


@interface KABModel (ExhibitionRelative)
- (KABExhibitionModel *)exhibitionListWithDictionary:(NSDictionary *)dic isAddMore:(BOOL)addMore;
@end


@interface KABModel (MallRelative)
- (KABMallHomepage *)mallHomepageWithDictionary:(NSDictionary *)dic;
- (KABMallBannerList *)mallBannerListWithDictionary:(NSDictionary *)dic;
- (KABMallProductList *)mallProductListWithDictionary:(NSDictionary *)dic isAddMore:(BOOL)addMore;
- (KABMallProductType *)mallProductTypeWithDictionary:(NSDictionary *)dic;
@end
